package com.sdp.wx.db.wx_wz_procured_detail.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author zsp
 * @since 2024-01-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wx_wz_procured_detail")
public class WxWzProcuredDetail extends Model<WxWzProcuredDetail> {

    private static final long serialVersionUID=1L;

    /**
     * 内码
     */
    @TableId("key_id")
    private String keyId;

    /**
     * 计划内码
     */
    @TableField("plan_id")
    private String planId;
    
    /**
     * 计划编号
     */
    @TableField("plan_code")
    private String planCode;

    /**
     * 器材编码
     */
    @TableField("wz_no")
    private String wzNo;

    /**
     * 器材名称
     */
    @TableField("wz_name")
    private String wzName;

    /**
     * 器材计量单位
     */
    @TableField("wz_unit")
    private String wzUnit;

    /**
     * 器材型号
     */
    @TableField("wz_model")
    private String wzModel;

    /**
     * 采购数量
     */
    @TableField("procured_num")
    private BigDecimal procuredNum;

    /**
     * 记录生成时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 最低进价
     */
    @TableField("lowest_price")
    private BigDecimal lowestPrice;
    
    /**
     * 预计单价
     */
    @TableField("est_price")
    private BigDecimal estPrice;
    
    /**
     * 供应商
     */
    @TableField("vendor_code")
    private String vendorCode;
    
    /**
     * 预计到货日期
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("est_arrival_date")
    private LocalDate estArrivalDate;
      
    /**
     * 未到货数量
     */
    @TableField("not_arrival_num")
    private BigDecimal notArrivalNum;
    
    /**
     * 到货数量
     */
    @TableField("arrival_num")
    private BigDecimal arrivalNum;
    

    @Override
    protected Serializable pkVal() {
        return this.keyId;
    }

}
